package org.jeecg.modules.system.announcement.mapper;

import org.apache.ibatis.annotations.Param;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.system.announcement.entity.BikeAnnouncement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.announcement.vo.BikeAnnouncementRsp;
import org.jeecg.modules.system.announcement.vo.BikeAnnouncementSendReq;
import org.jeecg.modules.system.announcement.vo.BikeSysMsgReq;

import java.util.List;

/**
 * @Description: 消息管理
 * @Author: 月月鸟
 * @Date:   2021-06-15
 * @Version: V1.0
 */
public interface BikeAnnouncementMapper extends BaseMapper<BikeAnnouncement> {
    /**
     * 根据用户id获取系统消息
     * */
    List<BikeAnnouncementRsp> getSysMsgByUser(BikeSysMsgReq bikeSysMsgReq);

    /**
     * 根据用户id获取系统未读消息数量
     * */
    Integer getSysMsgNoReadCount(String id);
    /**
     * 根据系统消息id 修改 已读未读状态
     * */
    void readMsgById(@Param("id") String id,@Param("userName") String userName);

    /**
     * 新增系统消息关联记录
     * */
    void addSysMsgByUser(BikeAnnouncementSendReq bikeAnnouncementSendReq);
    /**
     * 根据菜单名，获取拥有菜单权限的用户
     * */
    List<String> getSysUserIds(String permissionName);

    Integer getReportCount();

    Integer getAppealCount();
}
